package com.cloud.api.domain.alarm;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.cloud.core.entity.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author haohaibo
 * @since 2023-12-22
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("t_alarm_scheme")
@Schema(name = "AlarmScheme", description = "报警方案管理")
public class AlarmScheme extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "主键")
    @TableId("id")
    private String id;

    @Schema(description = "报警类别")
    @TableField("alarm_type")
    @NotNull(message = "{validation.scheme.alarmType}")
    private Integer alarmType;

    @Schema(description = "code码")
    @TableField("code")
    private String code;

    @Schema(description = "报警通知状态")
    @TableField("alarm_status")
    private Boolean alarmStatus;

    @Schema(description = "报警原因")
    @TableField("alarm_cause")
    @NotEmpty(message = "{validation.scheme.alarmCause}")
    @Size(max = 100,min = 5,message = "{validation.common.size}")
    private String alarmCause;

    @Schema(description = "建议处理办法")
    @TableField("suggest_handle_method")
    @Size(max = 200,min = 5,message = "{validation.common.size}")
    @NotEmpty(message = "{validation.scheme.suggestHandleMethod}")
    private String suggestHandleMethod;
}
